{% extends 'rango/base.html' %}
{% block body_block %}
<div class="hero-unit">
    <h1>Ready to Rango</h1>
    <p>Find, Add, Share and Rango useful links and resources.</p>
</div>
<div class="row-fluid">
    <div class="span6">
        {% if categories %}
        <h2> Top 5 categories </h2>
        <ul>
            {% for category in categories %}
            <li><a href="/rango/category/{{ category.url }}">{{ category.name }}</a></li>
            {% endfor %}
        </ul>
        {% else %}
        <strong>There are no categories present.</strong>
        {% endif %}
    </div>
    <div class="span6">
        {% if pages %}
        <h2> Top 5 most viewed pages </h2>    
        <ul>
            {% for page in pages %}
            <li>
                <a href="/rango/goto/?page_id={{page.id}}">{{ page.title }}</a>
                {% if page.views >= 1 %}
                    - ({{ page.views }} views)
                {% endif %}
                {% endfor %}
            </li>
        </ul>
        {% else %}
        <strong>There are no pages present.</strong><br/>
        {% endif %}
    </div>
    <!--    
    <a href="/rango/add_category/">Add a New Category</a>
    <br/><br/>
    -->
</div>
{% endblock %}
